The USB42 Sample

The USB42 Sample accompanies Chapter 11. It’s the simplest example I could dream up of a USB device driver.

The sample includes three components:

Building USB42

To build USB42.SYS, follow the general instructions for building a WDM sample. The Microsoft Visual C++ project file is named USB42.DSP in the SYS subdirectory.

To build TEST.EXE, follow the general instructions for building user-mode programs. The Microsoft Visual C++ project file is named TEST.DSP in the TEST subdirectory.

Testing USB42

First follow the general instructions for testing USB samples to install the device firmware (42.HEX in the EZUSB subdirectory) and the driver. Then open a command prompt and run TEST.EXE from the TEST\DEBUG subdirectory. TEST will use an I/O control operation to read a constant value from a bulk endpoint on the device.